import { createRouter, createWebHistory } from "vue-router";


const addCount = () => import('../components/addCount.vue')
const Father = () => import('../components/father.vue')
const children = () => import('../components/child.vue')
const modal = () => import('../components/modal.vue')


const routes = [
    {
        path: "/",
        redirect: '/add'
    },
    {
        path: "/father",
        name: "father",
        component: Father,
        children:
            [
                {
                    path: '/child',
                    component: children
                }
            ]
    },
    {
        path: "/add",
        name: "add",
        component: addCount
    },
    {
        path: "/modal",
        component: modal
    },
    // {
    //     path: '/child',
    //     component: children
    // }
]

const router = createRouter({
    history: createWebHistory(),
    routes: routes
})
export default router

